;; srecode-dot.srt --- 
;;
;; Copyright (C) 2009, 2010 Eric M. Ludlam
;;
;; Author: Eric M. Ludlam <eric@siege-engine.com>
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or (at
;; your option) any later version.

;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

set mode "graphviz-dot-mode"
set escape_start "{{"
set escape_end "}}"

set comment_start  "/**"
set comment_end    " */"
set comment_prefix " *"

context file

template empty :time :user :file :dot
----
{{>:filecomment}}
digraph structs {
	{{^}}
}
----

template cogre :time :dot :cogre
----
{{comment_start}}
{{comment_prefix}} Graph {{GRAPHNAME}} Generated by Emacs/SRecode on {{TIME}}.
{{comment_end}}
----

context declaration

template digraph-tag :blank
"Insert a digraph structure.
NOTE: Using Courier font allows Emacs monospace fonts to match the
layout specified by dot with a simple ratio."
----
digraph structs {
	node [shape=record fontsize=12 fontname=Courier];
	{{^}}
}
----

template generic-node :blank :tag
"Basic node declaration for generic attributes."
----
	node [shape={{SHAPE}}];
----

template node :blank :tag
"Basic node tag to convert from a Semantic parse."
----
	"{{NAME}}" [ {{#ATTRIBUTES}} {{LABEL}}="{{VALUE}}"{{/ATTRIBUTES}} ];
----

template link :blank :tag
"Basic link tag to convert from a Semantic parse."
----
	"{{NAME}}" -> "{{TAIL}}" [ {{#ATTRIBUTES}} {{LABEL}}="{{VALUE}}"{{/ATTRIBUTES}} ];
----


;; end